<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%
    request.setCharacterEncoding("UTF-8");
%>
<%
    String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- <%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListPage.jsp" %> --%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListExamSubject.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
</head>
<style>
    select {
        width: 234px;
        height: 31px
    }

    .gn_name {
        padding-top: 5px
    }

    .div_zilei {
        width: 100%;
        height: 30px
    }

    .tr {
        height: 40px;
        background:#57a0ff;
        font-weight:700;
    }

    .tr td {
        font-size: 14px;
        color: #ffffff
    }

    .tr_td {
        height: 40px;
    }

    .tr_td td {
        border-bottom: 1px solid #ededed;
        text-align: center;
    }

    tr td:nth-child(1) {
        font-size: 14px;
        color: #cccccc
    }

    .date {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .tr_td td:nth-child(1) {
        border-left: 1px solid #cccccc;
    }

    .tr_td td:nth-child(3) {
        border-right: 1px solid #cccccc;
    }

    .addTable.deleteTable:HOVER {
        cursor: pointer;
    }

    type[type='checkbox'] {
        width: 15px
    }

    .addSubscribeStudent {
        background-color: #57a0ff;
        height: 35px;
        width: 130px;
        color: #ffffff;
        border: 0;
        margin-top: 20px;
        border-radius: 15px;
        padding: 5px;
        -moz-border-radius: 5px;
        outline: none;
        margin-right: 50px;
        cursor: pointer;
    }
</style>
<body style="background: #f5f5f5">
<div class="main">
    <div id="modal-overlay">

    </div>
    <div class="weizhi">
        <c:if test="${subjectOneReg.cfbillstate eq 3}">
            考试管理>>科目一考试登记>>修改
        </c:if>
        <c:if test="${subjectOneReg.cfbillstate eq 4 ||  subjectOneReg.cfbillstate eq 5 }">
            考试管理>>科目一考试登记>>查看
        </c:if>
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;height: 1100px">
        <c:if test="${subjectOneReg.cfbillstate eq 3}">
            <div class="div_form">
                <form id="update_subjectOneReg" action="<%=path%>/DrivingSys/updateSubjectOneReg" method="post"
                      class="form" onsubmit="return subForm()">
                    <input type="hidden" name="fid" value="${subjectOneReg.fid }">
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" name="name" value="${department.fnameL2}" readonly="readonly"
                                   style="color: gray;"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input type="text" class="fnumber" name="fnumber" value="${subjectOneReg.fnumber}"
                                   style="color: gray;" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input type="text" name="fbizdate" id="ywrq" value="${subjectOneReg.fbizdate}"
                                   onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                                   onchange="changeFbizdate($(this))"/>
                            <input type="hidden" id="subjectType" value="2">
                            <img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                                 src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                            <input name="fdescription" value="${subjectOneReg.fdescription }"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <select name="cfbillstate">
                                <option id="shenhe" style="color: gray;" value="3">保存</option>
                            </select>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">车型&nbsp;:&nbsp;</span>
                            <select name="cfcartype" class="cfcartype" onchange="changeCartype()">
                                <option value="${subjectOneReg.cfcartype}">${subjectOneReg.cfcartype }</option>
                                <option value="A1">A1</option>
                                <option value="A2">A2</option>
                                <option value="A3">A3</option>
                                <option value="B1">B1</option>
                                <option value="B2">B2</option>
                                <option value="C1">C1</option>
                                <option value="C2">C2</option>
                                <option value="C3">C3</option>
                                <option value="C4">C4</option>
                                <option value="D">D</option>
                                <option value="E">E</option>
                                <option value="F">F</option>
                                <option value="M">M</option>
                                <option value="N">N</option>
                                <option value="P">P</option>
                            </select>

                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                            <input id="cfzbs" name="cfzbs" value="${subjectOneReg.cfzbs }" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                            <input id="cfdqbkrs" name="cfdqbkrs" value="${subjectOneReg.cfdqbkrs }"
                                   readonly="readonly"/>
                        </div>
                    </div>
                    <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<input type="button"
                                                                                         class="addSubscribeStudent"
                                                                                         value="添加预约学员"/></div>
                    <div class="div_zilei">
                        <div style="width: 93%;text-align: right;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #57a0ff;font-weight:700;font-size: 14px" class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #57a0ff;font-weight:700;;font-size: 14px"
                                  class="deleteTable">删除</span>
                        </div>
                    </div>
                    <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                        <table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                            <tr class="tr">
                                <td><%--<input type="checkbox" name="check" class="check1">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td>
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                            <c:forEach items="${subjectOneReg.subjectOneRegentryList }" var="subjectOneRegentry">
                                <tr class="tr_td">
                                    <td><input type="checkbox" name="checkchilden" value="">
                                        <input
                                                type="hidden" class="subfid" name="subfid"
                                                value="${subjectOneRegentry.cfstudentid }"
                                                readonly="readonly"> <input type="hidden" class="subcfclazzid"
                                                                            name="subcfclazzid" value=""
                                                                            readonly="readonly">
                                    </td>
                                    <td><input type="text" class="fseq1" name="subfseq"
                                               value="${subjectOneRegentry.fseq }" readonly="readonly">
                                    </td>
                                    <td align="center"><input class="cfzkzmbh"
                                                              style="width: 90px;" type="text" name="subcfzkzmbh"
                                                              value="${subjectOneRegentry.cfzkzmbh }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subfnameL2"
                                                              value="${subjectOneRegentry.studentName }"
                                                              class="clickName is_click_ne" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 170px;" type="text"
                                                              name="subfnumber"
                                                              value="${subjectOneRegentry.cfstudentname }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;" type="text"
                                                              name="subcfidcardno"
                                                              value="${subjectOneRegentry.cfidcardno }"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfsex eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="男"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfsex eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="女"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfsjhm" value="${subjectOneRegentry.cfmobile }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcflxdh" value="${subjectOneRegentry.cfphone }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcftjrName" value="${subjectOneRegentry.cftjr }"
                                                              readonly="readonly"/> <input
                                            style="width: 90px;" type="hidden" name="subcftjrid"
                                            value=""/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfslzjcxdh"
                                                              value="${subjectOneRegentry.cfsqzjcxdh }"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 1}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="本地" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 2}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="异地" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 3}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="学生" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfkmykss" value="${subjectOneRegentry.cfkscs}"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfkscs eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="初考"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfkscs gt 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="补考"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbxwx eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="本校"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbxwx eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="外校"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 150px;" type="text"
                                                              name="subcfclazzName"
                                                              value="${subjectOneRegentry.cfclazz }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfreceived"
                                                              value="${subjectOneRegentry.cfyisje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcffavorable"
                                                              value="${subjectOneRegentry.cfyhje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfamount" value="${subjectOneRegentry.cfysje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfarrearage"
                                                              value="${subjectOneRegentry.cfqfje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;" type="text"
                                                              name="cfremark" value="${subjectOneRegentry.cfremark}"/>
                                    </td>
                                    <c:if test="${subjectOneRegentry.cfdajj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="0"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfdajj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="0"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfdajj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="1"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly"
                                                                  name="subcfjnbjj" value="0"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly"
                                                                  name="subcfjnbjj" value="0"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfjnbjj" value="1"/></td>
                                    </c:if>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>

                    <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                    <div class="div_zilei">
                            <%--<div style="width: 88%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                            </div>--%>
                    </div>
                    <div style="overflow:auto;min-height: 200px;width: 88%;margin-left: 90px">
                        <table id="table2" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                            <tr class="tr">
                                <td><%--<input type="checkbox" name="check" class="check1">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <!-- <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td> -->
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                        </table>
                    </div>
                    <div class="div_input_hang">

                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input name="checkName" value="${subjectOneReg.checkName }" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                            <input name="createName" value="${subjectOneReg.createName }" readonly="readonly"/>

                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input name="fcreatetime" style="color: gray;" readonly="readonly"
                                   value="${subjectOneReg.fcreatetime }"/>
                        </div>
                    </div>

                    <div class="div_tj" style="padding-top: 0px">
                            <%--<c:if test="${subjectOneReg.cfbillstate eq 3}">
                                    <div>
                                        <input type="button" class="input_submit" value="审 核" onclick="audit()"/>
                                    </div>
                            </c:if>--%>
                        <shiro:hasPermission name="/sureSubjectOneReg">
                            <div>
                                <input class="input_submit bc" value="" type="submit">
                            </div>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="/submitSubjectOneReg">
                            <div>
                                <input class="input_submit tj" value="" type="button" onclick="audit(4)">
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value=""
                                   onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
                        </div>

                        <div>
                            <input type="button" class="input_back fh" value="" onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>


        <c:if test="${subjectOneReg.cfbillstate eq 4}">
            <div class="div_form">
                <form id="update_subjectOneReg" action="<%=path%>/DrivingSys/updateSubjectOneReg" method="post"
                      class="form">
                    <input type="hidden" name="fid" value="${subjectOneReg.fid }">
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" name="name" value="${department.fnameL2}" readonly="readonly"
                                   style="color: gray;"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input class="fnumber" type="text" name="fnumber" value="${subjectOneReg.fnumber}"
                                   style="color: gray;" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input type="text" name="fbizdate" id="ywrq" value="${subjectOneReg.fbizdate}"
                                   style="color: gray;" readonly="readonly"/>
                            <input type="hidden" id="subjectType" value="2">
                            <img src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                            <input name="fdescription" value="${subjectOneReg.fdescription }" style="color: gray;" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <select name="cfbillstate" readonly="readonly" style="color: gray;">
                                <option id="shenhe" style="color: gray;" value="4">提交</option>
                            </select>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">车型&nbsp;:&nbsp;</span>
                            <select name="cfcartype" class="cfcartype" readonly="readonly" style="color: gray;"
                                    disabled="disabled">
                                <option value="${subjectOneReg.cfcartype}">${subjectOneReg.cfcartype }</option>
                                <option value="A1">A1</option>
                                <option value="A2">A2</option>
                                <option value="A3">A3</option>
                                <option value="B1">B1</option>
                                <option value="B2">B2</option>
                                <option value="C1">C1</option>
                                <option value="C2">C2</option>
                                <option value="C3">C3</option>
                                <option value="C4">C4</option>
                                <option value="D">D</option>
                                <option value="E">E</option>
                                <option value="F">F</option>
                                <option value="M">M</option>
                                <option value="N">N</option>
                                <option value="P">P</option>
                            </select>

                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                            <input id="cfzbs" name="cfzbs" value="${subjectOneReg.cfzbs }" readonly="readonly"
                                   style="color: gray;"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                            <input id="cfdqbkrs" name="cfdqbkrs" value="${subjectOneReg.cfdqbkrs }" readonly="readonly"
                                   style="color: gray;"/>
                        </div>
                    </div>
                    <div style="margin-left: 90px;">
                        确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<%--<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span>--%></div>
                    <div class="div_zilei">
                            <%--<div style="width: 88%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                            </div>--%>
                    </div>
                    <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                        <table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                            <tr class="tr">
                                <td><%--<input type="checkbox" name="check" class="check1">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td>
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                            <c:forEach items="${subjectOneReg.subjectOneRegentryList }" var="subjectOneRegentry">
                                <tr class="tr_td">
                                    <td><input type="checkbox" name="checkchilden" value="" readonly="readonly">
                                        <input
                                                type="hidden" class="subfid" name="subfid"
                                                value="${subjectOneRegentry.cfstudentid }"
                                                readonly="readonly"> <input type="hidden" class="subcfclazzid"
                                                                            name="subcfclazzid" value=""
                                                                            readonly="readonly">
                                    </td>
                                    <td><input type="text" class="fseq1" name="subfseq"
                                               value="${subjectOneRegentry.fseq }" readonly="readonly">
                                    </td>
                                    <td align="center"><input class="cfzkzmbh"
                                                              style="width: 90px;" type="text" name="subcfzkzmbh"
                                                              value="${subjectOneRegentry.cfzkzmbh }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subfnameL2"
                                                              value="${subjectOneRegentry.studentName }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 170px;" type="text"
                                                              name="subfnumber"
                                                              value="${subjectOneRegentry.cfstudentname }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;" type="text"
                                                              name="subcfidcardno"
                                                              value="${subjectOneRegentry.cfidcardno }"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfsex eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="男"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfsex eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="女"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfsjhm" value="${subjectOneRegentry.cfmobile }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcflxdh" value="${subjectOneRegentry.cfphone }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcftjrName" value="${subjectOneRegentry.cftjr }"
                                                              readonly="readonly"/> <input
                                            style="width: 90px;" type="hidden" name="subcftjrid"
                                            value=""/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfslzjcxdh"
                                                              value="${subjectOneRegentry.cfsqzjcxdh }"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 1}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="本地" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 2}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="异地" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbdyd eq 3}">
                                        <td align="center"><input style="width: 90px;" type="text"
                                                                  name="subcflocal" value="学生" readonly="readonly"/>
                                        </td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfkmykss" value="${subjectOneRegentry.cfkscs}"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfkscs eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="初考"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfkscs gt 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="补考"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbxwx eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="本校"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfbxwx eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="外校"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 150px;" type="text"
                                                              name="subcfclazzName"
                                                              value="${subjectOneRegentry.cfclazz }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfreceived"
                                                              value="${subjectOneRegentry.cfyisje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcffavorable"
                                                              value="${subjectOneRegentry.cfyhje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfamount" value="${subjectOneRegentry.cfysje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcfarrearage"
                                                              value="${subjectOneRegentry.cfqfje }"
                                                              readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;" type="text"
                                                              name="cfremark" value="${subjectOneRegentry.cfremark}"
                                                              readonly="readonly"/></td>
                                    <c:if test="${subjectOneRegentry.cfdajj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="0"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfdajj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="0"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfdajj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="1"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly"
                                                                  name="subcfjnbjj" value="0" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled"
                                                                  readonly="readonly"
                                                                  name="subcfjnbjj" value="0" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectOneRegentry.cfjnbjj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfjnbjj" value="1"
                                                                  readonly="readonly"/></td>
                                    </c:if>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>

                    <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                    <div class="div_zilei">
                            <%--<div style="width: 88%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                            </div>--%>
                    </div>
                    <div style="overflow:auto;min-height: 200px;width: 88%;margin-left: 90px">
                        <table id="table2" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                            <tr class="tr">
                                <td><%--<input type="checkbox" name="check" class="check1">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <!-- <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td> -->
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                        </table>
                    </div>
                    <div class="div_input_hang">

                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input name="checkName" readonly="readonly" value="${subjectOneReg.checkName }"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                            <input name="createName" value="${subjectOneReg.createName } " readonly="readonly"
                                   style="color: gray;"/>

                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input name="fcreatetime" style="color: gray;" readonly="readonly"
                                   value="${subjectOneReg.fcreatetime }" readonly="readonly"/>
                        </div>
                    </div>

                    <div class="div_tj" style="padding-top: 0px">
                            <%-- <div>
                                 <input  class="input_submit" value="确   定" type="submit">
                             </div>--%>
                        <shiro:hasPermission name="/auditSubjectOneReg">
                            <c:if test="${activitiState eq 'power'}">
                                <div>
                                    <input class="input_submit sh" value="" type="button" onclick="audit(5)">
                                </div>
                            </c:if>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="/againstAuditSubjectOneReg">
                            <div>
                                <input class="input_submit fsh" value="" type="button" onclick="audit(3)">
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value=""
                                   onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value="" onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>

        <c:if test="${subjectOneReg.cfbillstate eq 5 }">
        <div class="div_form">
            <form id="update_subjectOneReg" action="<%=path%>/DrivingSys/updateSubjectOneReg" class="form">
                <input type="hidden" name="fid" value="${subjectOneReg.fid }">
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input type="text" name="name" value="${department.fnameL2}" readonly="readonly"
                               style="color: gray;"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                        <input class="fnumber" type="text" name="fnumber" value="${subjectOneReg.fnumber}"
                               style="color: gray;" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                        <input readonly="readonly" type="text" name="fbizdate" id="ywrq"
                               value="${subjectOneReg.fbizdate }"/>
                        <img src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fdescription" value="${subjectOneReg.fdescription }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                        <select name="cfbillstate">
                            <option class="shenhe" style="color: gray;" value="5" selected="selected">审核</option>
                        </select>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select name="cfcartype">
                            <option disabled="disabled" value="${subjectOneReg.cfcartype }"
                                    selected="selected">${subjectOneReg.cfcartype }</option>
                        </select>
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">指标人数&nbsp;:&nbsp;</span>
                        <input disabled="disabled" id="cfzbs" name="cfzbs" value="${subjectOneReg.cfzbs }"
                               readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">当前报考人数&nbsp;:&nbsp;</span>
                        <input disabled="disabled" id="cfdqbkrs" name="cfdqbkrs" value="${subjectOneReg.cfdqbkrs }"
                               readonly="readonly"/>
                    </div>
                </div>
                <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;
                    <!-- <span><a href="#">添加预约学员</a></span> --></div>
                <div class="div_zilei">
                        <%--<div style="width: 88%;text-align: right;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                        </div>--%>
                </div>
                <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                    <table id="table1" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                        <tr class="tr">
                            <td><%--<input type="checkbox" name="check" class="check1">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员姓名</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机号码</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">推荐人</td>
                            <td style="width: 90px;" align="center">申请准驾车型代号</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试次数</td>
                            <td style="width: 90px;" align="center">初考/补考</td>
                            <td style="width: 90px;" align="center">本校/外校</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">优惠</td>
                            <td style="width: 90px;" align="center">应收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">备注</td>
                            <td style="width: 90px;" align="center">档案交接</td>
                            <td style="width: 90px;" align="center">技能表交接</td>
                        </tr>
                        <c:forEach items="${subjectOneReg.subjectOneRegentryList }" var="subjectOneRegentry">
                            <tr class="tr_td">
                                <td><input type="checkbox" name="checkchilden" value="">
                                    <input
                                            type="hidden" class="subfid" name="subfid"
                                            value="${subjectOneRegentry.cfstudentid }"
                                            readonly="readonly"> <input type="hidden" class="subcfclazzid"
                                                                        name="subcfclazzid" value=""
                                                                        readonly="readonly">
                                </td>
                                <td><input type="text" class="fseq1" name="subfseq"
                                           value="${subjectOneRegentry.fseq }" readonly="readonly">
                                </td>
                                <td align="center"><input class="cfzkzmbh"
                                                          style="width: 90px;" type="text" name="subcfzkzmbh"
                                                          value="${subjectOneRegentry.cfzkzmbh }" readonly="readonly"/>
                                </td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subfnameL2" value="${subjectOneRegentry.studentName }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 170px;" type="text"
                                                          name="subfnumber" value="${subjectOneRegentry.cfstudentname }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 140px;" type="text"
                                                          name="subcfidcardno" value="${subjectOneRegentry.cfidcardno }"
                                                          readonly="readonly"/></td>
                                <c:if test="${subjectOneRegentry.cfsex eq 1 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfsex" value="男"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfsex eq 2 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfsex" value="女"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfsjhm" value="${subjectOneRegentry.cfmobile }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcflxdh" value="${subjectOneRegentry.cfphone }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcftjrName" value="${subjectOneRegentry.cftjr }"
                                                          readonly="readonly"/> <input
                                        style="width: 90px;" type="hidden" name="subcftjrid"
                                        value="" readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfslzjcxdh" value="${subjectOneRegentry.cfsqzjcxdh }"
                                                          readonly="readonly"/></td>
                                <c:if test="${subjectOneRegentry.cfbdyd eq 1}">
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcflocal" value="本地" readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfbdyd eq 2}">
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcflocal" value="异地" readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfbdyd eq 3}">
                                    <td align="center"><input style="width: 90px;" type="text"
                                                              name="subcflocal" value="学生" readonly="readonly"/></td>
                                </c:if>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfkmykss" value="${subjectOneRegentry.cfkscs}"
                                                          readonly="readonly"/></td>
                                <c:if test="${subjectOneRegentry.cfkscs eq 0 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfckbk" value="初考"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfkscs gt 0 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfckbk" value="补考"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfbxwx eq 1 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfbxwx" value="本校"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfbxwx eq 2 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfbxwx" value="外校"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <td align="center"><input style="width: 150px;" type="text"
                                                          name="subcfclazzName" value="${subjectOneRegentry.cfclazz }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfreceived" value="${subjectOneRegentry.cfyisje }"/>
                                </td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcffavorable" value="${subjectOneRegentry.cfyhje }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfamount" value="${subjectOneRegentry.cfysje }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 90px;" type="text"
                                                          name="subcfarrearage" value="${subjectOneRegentry.cfqfje }"
                                                          readonly="readonly"/></td>
                                <td align="center"><input style="width: 140px;" type="text"
                                                          name="cfremark" value="${subjectOneRegentry.cfremark}"
                                                          readonly="readonly"/></td>
                                <c:if test="${subjectOneRegentry.cfdajj eq 0 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" disabled="disabled"
                                                              readonly="readonly" name="subcfdajj" value="0"
                                                              readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfdajj eq null }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" disabled="disabled"
                                                              readonly="readonly" name="subcfdajj" value="0"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfdajj eq 1 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" checked="checked" disabled="disabled"
                                                              readonly="readonly" name="subcfdajj" value="1"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfjnbjj eq 0 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" disabled="disabled" readonly="readonly"
                                                              name="subcfjnbjj" value="0" readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfjnbjj eq null }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" disabled="disabled" readonly="readonly"
                                                              name="subcfjnbjj" value="0" readonly="readonly"/></td>
                                </c:if>
                                <c:if test="${subjectOneRegentry.cfjnbjj eq 1 }">
                                    <td align="center"><input style="width: 90px;"
                                                              type="checkbox" checked="checked" disabled="disabled"
                                                              readonly="readonly" name="subcfjnbjj" value="1"/></td>
                                </c:if>
                            </tr>
                        </c:forEach>
                    </table>
                </div>

                <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                    <%--<div class="div_zilei">
                        <div style="width: 88%;text-align: right;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                        </div>--%>
        </div>
        <div style="overflow:auto;/*min-height: 200px;*/width: 88%;margin-left:110px">
            <table id="table2" style="min-height:50px;border-spacing:0;width: auto;white-space:nowrap;">
                <tr class="tr">
                    <td><%--<input type="checkbox" >--%></td>
                    <td class="fseq">序号</td>
                    <td style="width: 90px;" align="center">准考证明编号</td>
                    <td style="width: 90px;" align="center">学员姓名</td>
                    <td style="width: 90px;" align="center">学员编码</td>
                    <td style="width: 90px;" align="center">身份证号</td>
                    <td style="width: 90px;" align="center">性别</td>
                    <td style="width: 90px;" align="center">手机号码</td>
                    <td style="width: 90px;" align="center">电话</td>
                    <td style="width: 90px;" align="center">推荐人</td>
                    <td style="width: 90px;" align="center">申请准驾车型代号</td>
                    <td style="width: 90px;" align="center">本地/异地</td>
                    <td style="width: 90px;" align="center">考试次数</td>
                    <td style="width: 90px;" align="center">初考/补考</td>
                    <td style="width: 90px;" align="center">本校/外校</td>
                    <td style="width: 90px;" align="center">班级</td>
                    <!-- <td style="width: 90px;" align="center">已收</td>
                    <td style="width: 90px;" align="center">优惠</td>
                    <td style="width: 90px;" align="center">应收</td>
                    <td style="width: 90px;" align="center">欠费</td> -->
                    <td style="width: 90px;" align="center">备注</td>
                    <td style="width: 90px;" align="center">档案交接</td>
                    <td style="width: 90px;" align="center">技能表交接</td>
                </tr>

            </table>
        </div>
        <div class="div_input_hang">

        </div>
        <div class="div_input_hang">
            <div class="input_hang">
                <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                <input disabled="disabled" name="checkName" value="${subjectOneReg.checkName }"/>
            </div>
            <div class="input_hang">
                <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                <input disabled="disabled" name="createName" value="${subjectOneReg.createName }"/>

            </div>
            <div class="input_hang">
                <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                <input disabled="disabled" name="fcreatetime" style="color: gray;" readonly="readonly"
                       value="${subjectOneReg.fcreatetime }"/>
            </div>
        </div>

        <div class="div_tj" style="padding-top: 0px">
            <!-- <div>
                <input onclick="chcek()" class="input_submit" value="保   存" type="submit">
            </div> -->
            <shiro:hasPermission name="/againstAuditSubjectOneReg">
                <div>
                    <input class="input_submit fsh" value="" type="button" onclick="audit(3)">
                </div>
            </shiro:hasPermission>
            <div>
                <input type="button" class="input_submit cklc" value=""
                       onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
            </div>
            <div>
                <input type="button" class="input_back fh" value="" onclick="back()"/>
            </div>
        </div>
        </form>
    </div>
    </c:if>
    <%--保存流程查询的结果--%>
    <%--有正在进行的流程--%>
    <c:if test="${activitiState eq 'power' || activitiState eq 'noAssign'}">
        <input type="hidden" class="activitiState" value="1">
    </c:if>
    <%--没有进行的流程--%>
    <c:if test="${activitiState eq 'noTask' || activitiState eq 'finish' || activitiState eq 'failed'}">
        <input type="hidden" class="activitiState" value="2">
    </c:if>
</div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>

<script id="table-template1-sub" type="text/x-handlebars-template">
    {{#each studentsNameList}}
    <tr class="tr_td">
        <td><input type="checkbox" name="checkchilden" value="">
            <input type="hidden" class="subfid" name="subfid" value="{{fid}}" readonly="readonly">
            <input type="hidden" class="subcfclazzid" name="subcfclazzid" value="{{cfclazzid}}" readonly="readonly">
        </td>
        <td><input type="text" class="fseq1" name="subfseq" value="" readonly="readonly">
        </td>
        <td align="center"><input class="cfzkzmbh" style="width: 90px;" type="text" name="subcfzkzmbh"
                                  value="{{cfzkzmbh}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subfnameL2" value="{{fnameL2}}"
                                  class="clickName is_click_ne" readonly="readonly"/></td>
        <td align="center"><input style="width: 170px;" type="text" name="subfnumber" value="{{fnumber}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="subcfidcardno" value="{{cfidcardno}}"
                                  readonly="readonly"/></td>
        {{#compare cfsex 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="男" readonly="readonly"/></td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="女" readonly="readonly"/></td>
        {{/compare}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsjhm" value="{{cfsjhm}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcflxdh" value="{{cflxdh}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcftjrName" value="{{cftjrName}}"
                                  readonly="readonly"/>
            <input style="width: 90px;" type="hidden" name="subcftjrid" value="{{cftjrid}}" readonly="readonly"/>
        </td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfslzjcxdh" value="{{cfslzjcxdh}}"
                                  readonly="readonly"/></td>
        {{#compare cflocal 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="本地" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cflocal 2}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="异地" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cflocal 3}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="学生" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfkmykss null}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="0" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="{{cfkmykss}}"
                                  readonly="readonly"/></td>
        {{/compare}}
        {{#compare cfkmykss 0}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="初考" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="补考" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfbxwx 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="本校" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="外校" readonly="readonly"/>
        </td>
        {{/compare}}
        <td align="center"><input style="width: 150px;" type="text" name="subcfclazzName" value="{{cfclazzName}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfreceived" value="{{cfreceived}}"
                                  readonly="readonly"/></td>
        {{#compare cffavorable null}}
        <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="0" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="{{cffavorable}}"
                                  readonly="readonly"/></td>
        {{/compare}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfamount" value="{{cfamount}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfarrearage" value="{{cfarrearage}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="cfremark" value="{{cfremark}}"/></td>
        {{#compare cfdajj null}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfdajj" value="{{cfdajj}}"/></td>
        {{/compare}}
        {{#compare cfdajj 0}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfdajj" value="{{cfdajj}}"/></td>
        {{/compare}}
        {{#compare cfdajj 1}}
        <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                                  readonly="readonly" name="subcfdajj" value="{{cfdajj}}"/></td>
        {{/compare}}
        {{#compare cfjnbjj null}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
        {{/compare}}
        {{#compare cfjnbjj 0}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
        {{/compare}}
        {{#compare cfjnbjj 1}}
        <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                                  readonly="readonly" name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
        {{/compare}}
    </tr>
    {{/each}}
</script>

<script id="table-template2-sub" type="text/x-handlebars-template">
    {{#each this}}
    <tr class="tr_td">
        <td><input type="checkbox" name="checkchilden" value="">
            <input type="hidden" class="subfid" name="subfid" value="{{cfstudentid}}" readonly="readonly">
            <input type="hidden" class="subcfclazzid" name="subcfclazzid" value="{{cfclazzid}}" readonly="readonly">
        </td>
        <td><input type="text" class="fseq1" name="subfseq" value="" readonly="readonly">
        </td>
        <td align="center"><input class="cfzkzmbh" style="width: 90px;" type="text" name="subcfzkzmbh"
                                  value="{{cfzkzmbh}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subfnameL2" value="{{cfstudentname}}"
                                  class="clickName is_click_ne" readonly="readonly"/></td>
        <td align="center"><input style="width: 170px;" type="text" name="subfnumber" value="{{stufnumber}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="subcfidcardno" value="{{cfidcardno}}"
                                  readonly="readonly"/></td>
        {{#compare cfsex 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="男" readonly="readonly"/></td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="女" readonly="readonly"/></td>
        {{/compare}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfsjhm" value="{{cfmobile}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcflxdh" value="{{cfphone}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcftjrName" value="{{cftjr}}"
                                  readonly="readonly"/>
            <input style="width: 90px;" type="hidden" name="subcftjrid" value="{{cftjrid}}" readonly="readonly"/>
        </td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfslzjcxdh" value="{{cfsqzjcxdh}}"
                                  readonly="readonly"/></td>
        {{#compare cfbdyd 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="本地" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfbdyd 2}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="异地" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfbdyd 3}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="学生" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfkmykss null}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="0" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="{{cfkmykss}}"
                                  readonly="readonly"/></td>
        {{/compare}}
        {{#compare cfkmykss 0}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="初考" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="补考" readonly="readonly"/>
        </td>
        {{/compare}}
        {{#compare cfbxwx 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="本校" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="外校" readonly="readonly"/>
        </td>
        {{/compare}}
        <td align="center"><input style="width: 150px;" type="text" name="subcfclazzName" value="{{clazzname}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfreceived" value="{{cfreceived}}"
                                  readonly="readonly"/></td>
        {{#compare cffavorable null}}
        <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="0" readonly="readonly"/>
        </td>
        {{else}}
        <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="{{cffavorable}}"
                                  readonly="readonly"/></td>
        {{/compare}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfamount" value="{{cfamount}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfarrearage" value="{{cfarrearage}}"
                                  readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="cfremark" value="{{cfremark}}"/></td>
        {{#compare cfdajj 0}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfdajj" value="0"/></td>
        {{/compare}}
        {{#compare cfdajj null}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfdajj" value="0"/></td>
        {{/compare}}
        {{#compare cfdajj 1}}
        <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                                  readonly="readonly" name="subcfdajj" value="1"/></td>
        {{/compare}}
        {{#compare cfjnbjj 0}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfjnbjj" value="0"/></td>
        {{/compare}}
        {{#compare cfjnbjj null}}
        <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                                  name="subcfjnbjj" value="0"/></td>
        {{/compare}}
        {{#compare cfjnbjj 1}}
        <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                                  readonly="readonly" name="subcfjnbjj" value="1"/></td>
        {{/compare}}
    </tr>
    {{/each}}
</script>

<script id="table-template3-sub" type="text/x-handlebars-template">
    {{#each studentsNameList}}
    <td><input type="checkbox" name="checkchilden" value="">
        <input type="hidden" class="fid" name="subfid" value="{{fid}}" readonly="readonly">
        <input type="hidden" class="fid" name="subcfclazzid" value="{{cfclazzid}}" readonly="readonly">
    </td>
    <td><input type="text" class="fseq1" name="subfseq" value="" readonly="readonly">
    </td>
    <td align="center"><input class="cfzkzmbh" style="width: 90px;" type="text" name="subcfzkzmbh" value="{{cfzkzmbh}}"
                              readonly="readonly"/></td>
    <td align="center"><input style="width: 90px;" type="text" name="subfnameL2" value="{{fnameL2}}"
                              class="clickName is_click_ne" readonly="readonly"/></td>
    <td align="center"><input style="width: 170px;" type="text" name="subfnumber" value="{{fnumber}}"
                              readonly="readonly"/></td>
    <td align="center"><input style="width: 140px;" type="text" name="subcfidcardno" value="{{cfidcardno}}"
                              readonly="readonly"/></td>
    {{#compare cfsex 1}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="男" readonly="readonly"/></td>
    {{else}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="女" readonly="readonly"/></td>
    {{/compare}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfsjhm" value="{{cfsjhm}}" readonly="readonly"/>
    </td>
    <td align="center"><input style="width: 90px;" type="text" name="subcflxdh" value="{{cflxdh}}" readonly="readonly"/>
    </td>
    <td align="center"><input style="width: 90px;" type="text" name="subcftjrName" value="{{cftjrName}}"
                              readonly="readonly"/>
        <input style="width: 90px;" type="hidden" name="subcftjrid" value="{{cftjrid}}" readonly="readonly"/>
    </td>
    <td align="center"><input style="width: 90px;" type="text" name="subcfslzjcxdh" value="{{cfslzjcxdh}}"
                              readonly="readonly"/></td>
    {{#compare cflocal 1}}
    <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="本地" readonly="readonly"/></td>
    {{/compare}}
    {{#compare cflocal 2}}
    <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="异地" readonly="readonly"/></td>
    {{/compare}}
    {{#compare cflocal 3}}
    <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="学生" readonly="readonly"/></td>
    {{/compare}}
    {{#compare cfkmykss null}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="0" readonly="readonly"/></td>
    {{else}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfkmykss" value="{{cfkmykss}}"
                              readonly="readonly"/></td>
    {{/compare}}
    {{#compare cfkmykss 0}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="初考" readonly="readonly"/></td>
    {{else}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="补考" readonly="readonly"/></td>
    {{/compare}}
    {{#compare cfbxwx 1}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="本校" readonly="readonly"/></td>
    {{else}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="外校" readonly="readonly"/></td>
    {{/compare}}
    <td align="center"><input style="width: 150px;" type="text" name="subcfclazzName" value="{{cfclazzName}}"
                              readonly="readonly"/></td>
    <td align="center"><input style="width: 90px;" type="text" name="subcfreceived" value="{{cfreceived}}"
                              readonly="readonly"/></td>
    {{#compare cffavorable null}}
    <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="0" readonly="readonly"/>
    </td>
    {{else}}
    <td align="center"><input style="width: 90px;" type="text" name="subcffavorable" value="{{cffavorable}}"
                              readonly="readonly"/></td>
    {{/compare}}
    <td align="center"><input style="width: 90px;" type="text" name="subcfamount" value="{{cfamount}}"
                              readonly="readonly"/></td>
    <td align="center"><input style="width: 90px;" type="text" name="subcfarrearage" value="{{cfarrearage}}"
                              readonly="readonly"/></td>
    <td align="center"><input style="width: 140px;" type="text" name="cfremark" value="{{cfremark}}"/></td>
    {{#compare cfdajj null}}
    <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                              name="subcfdajj" value="{{cfdajj}}"/></td>
    {{/compare}}
    {{#compare cfdajj 0}}
    <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                              name="subcfdajj" value="{{cfdajj}}"/></td>
    {{/compare}}
    {{#compare cfdajj 1}}
    <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                              readonly="readonly" name="subcfdajj" value="{{cfdajj}}"/></td>
    {{/compare}}
    {{#compare cfjnbjj null}}
    <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                              name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
    {{/compare}}
    {{#compare cfjnbjj 0}}
    <td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly"
                              name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
    {{/compare}}
    {{#compare cfjnbjj 1}}
    <td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled"
                              readonly="readonly" name="subcfjnbjj" value="{{cfjnbjj}}"/></td>
    {{/compare}}
    {{/each}}
</script>
<script type="text/javascript">

    //处理修改时候的this缓存
    var _this;
    //元素更新标示
    var updata;
    var num = $("#cfdqbkrs").val();//当前报名的人数
    num = Number(num)

    //注册一个比较大小的Helper,判断v1是否大于v2
    Handlebars.registerHelper("compare", function (v1, v2, options) {
        if (v1 == v2) {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });

    //已报学员
    var myTemplate1 = Handlebars.compile($("#table-template1-sub").html());
    //已经预约学员
    var myTemplate2 = Handlebars.compile($("#table-template2-sub").html());
    //修改
    var myTemplate3 = Handlebars.compile($("#table-template3-sub").html());
    //删除一行
    $(".deleteTable").click(function () {
        var k = 0;
        $("input:checkbox[name=checkchilden]:checked").each(function (i) {
            k++;
        })
        if (k == 0) {
            alert("请选中需要删除的行!")
            return false;
        }
        $("input:checkbox[name=checkchilden]:checked").each(function (i) {
            $(this).parent().parent().remove()
        })
        num -= k;
        $("#cfdqbkrs").val(num)
        $("#cfzbs").val(num)
        //处理序号
        $("input:text[name=subfseq]").each(function (i) {
            $(this).val(i + 1);
        })
    })


    $('.addTable').click(function () {
        var examdate=$("#ywrq").val();
        if(examdate == null || examdate == ''){
            alert("请选择考试日期！")
            $("#ywrq").focus()
        }else{
            getPagExamSub()
            //$('#table1').html($('#table1').html());
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data').css('visibility', 'visible')
            $('input:checkbox').removeAttr('checked');
            $('.page').show();
        }

    })


    /* 关闭弹出框    */
    $('.btn').click(function () {
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.modal-data').css('visibility', 'hidden')
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('input:checkbox').removeAttr('checked');
        $('.page').hide();
        _this = null;
    })


    //弹出模式框
    $('.clickName').live('click', function () {
        getPagExamSub()
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data').css('visibility', 'visible')
        $('input:checkbox').removeAttr('checked');
        $('.page').show();
        _this = $(this).parent().parent();
    })


    //查找符合预约过科目一考试的学员
    function getPagExamSub() {
        var examdate = $("#ywrq").val().trim()//考试日期
        var carType = $(".cfcartype").val();
        var subjectType = $("#subjectType").val();
        myname = $('.name1').val();
        cflxdh = $('.cflxdh').val();
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path%>/DrivingSys/getPagExamSub?pindex=0&name=' + myname + '&cflxdh=' + cflxdh + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val() + '&examdate=' + examdate + '&carType=' + carType + '&subjectType=' + subjectType,
            type: "get",
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });
    }

    //双击确认
    $(document).on('dblclick', '.xysj td', function () {
        var id = "";
        var j = 1;
        id = $(this).parent().find("td:nth-child(1)").find("input").val()
        selStudentMesg(j, id);

    })

    //把选中的信息名称填充到输入框中
    $('.subtn').click(function () {
        var spCodesTemp = "";
        var j = 0;
        $('input:checkbox[name=student]:checked').each(function (i) {
            j += 1
            if (0 == i) {
                //把学生id增加到字表中
                spCodesTemp = $(this).val();
            } else {
                spCodesTemp += ("," + $(this).val());
            }
        });
        if (spCodesTemp == '') {
            alert("至少勾选一项!")
            return false;
        }
        if (_this != null) {
            $('input:checkbox[name=student]:checked').each(function (i) {
                j += 1
                if (0 == i) {
                    //把学生id增加到字表中
                    spCodesTemp = $(this).val();
                }
            });
        }
        selStudentMesg(j, spCodesTemp);
    });

    function selStudentMesg(j, ids) {
        var ary_new = new Array();
        ary_new = ids.split(",");
        //获取已经在列表的学员id
        var students = "";
        for (var j = 0; j < ary_new.length; j++) {
            $(".subfid").each(function (i) {
                if ($(this).val() == ary_new[j]) {
                    var name = $(this).parent().parent().find("td input[name=subfnameL2]").val();
                    if (j == 0) {
                        students = name;
                    } else {
                        students += "," + name;
                    }
                }
            })
        }
        if (students != '') {
            alert(students + " 已经在列表中,请重新选择学员!")
            return false;
        }
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsByFid',
            type: "post",
            data: {'id': ids},
            dataType: "json",
            success: function (res) {
                var htmlhead = "<tr class='tr'> <td class='fseq'>序号</td> <td align='center'>准考证明编号</td><td align='center'>学员姓名</td><td align='center'>身份证号码</td> <td align='center'>性别</td> <td align='center'>手机号码</td> <td align='center'>电话</td>"
                htmlhead += "<td align='center'>推荐人</td><td align='center'>申请准驾车型代号</td><td align='center'>本地/异地</td><td align='center'>考试次数</td><td align='center'>初考/补考</td>"
                htmlhead += "<td align='center'>本校/外校</td><td align='center'>班级</td><td align='center'>已收</td><td align='center'>优惠</td><td align='center'>应收</td><td align='center'>欠费</td><td align='center'>备注</td><td align='center'>档案交接</td><td align='center'>技能表交接</td></tr>"
                var htmlhead1 = $('#table1').html();
                if (_this != null) {
                    //alert(_this)
                    _this.html(myTemplate3(res))
                    _this = null;
                } else {
                    $('#table1').html(htmlhead1 + myTemplate1(res));
                    num += j
                    j = 0;
                    $("#cfdqbkrs").val(num)
                    $("#cfzbs").val(num)
                }
                $('#modal-overlay').css('visibility', 'hidden')
                $('.modal-data').css('visibility', 'hidden')
                //处理序号
                $("input:text[name=subfseq]").each(function (i) {
                    $(this).val(i + 1);
                })
            },
            error: function () {
                alert('Error');
            }
        });
    }

    //添加预约科目一的学员
    $('.addSubscribeStudent').click(function () {
        var fbizdate = $.trim($("#ywrq").val());
        var carType = $(".cfcartype").val()
        if (fbizdate == null || fbizdate == '') {
            alert("考试日期不能为空！")
            $("#ywrq").focus()
        } else {
            $.ajax({
                url: '<%=path%>/DrivingSys/selExamsubscribeByFbizdate',
                type: "post",
                data: {'fbizdate': fbizdate, 'carType': carType},
                dataType: "json",
                success: function (json) {
                    if (json == null || json == '') {
                        alert("抱歉，该天没有预约科目一车型为" + carType + "的学员！")
                    } else {
                        var students = "";
                        var count = 0;//计数
                        var item = new Array();//记录重复学员对象的下标
                        for (var j = 0; j < json.length; j++) {
                            $(".subfid").each(function (i) {
                                if ($(this).val() == json[j].cfstudentid) {
                                    item.push(j)
                                    var name = $(this).parent().parent().find("td input[name=subfnameL2]").val();
                                    if (count == 0) {
                                        students = name;
                                    } else {
                                        students += "," + name;
                                    }
                                    count++;
                                }
                            })
                        }
                        if (students != '') {
                            for (var k = 0; k < item.length; k++) {
                                delete (json[item[k]]);//删除重复的学员对象
                            }
                            alert(students + " 已经在列表中,请重新选择学员!")
                            //return false;
                        }
                        var htmlhead2 = $('#table1').html();
                        $('#table1').html(htmlhead2 + myTemplate2(json));
                        num += (json.length - item.length)
                        //alert(num)
                        $("#cfdqbkrs").val(num)
                        $("#cfzbs").val(num)
                        //处理序号
                        $("input:text[name=subfseq]").each(function (i) {
                            $(this).val(i + 1);
                        })
                    }
                },
                error: function () {
                    alert('Error');
                }
            });
        }
    });

    //设置全选功选 
    $('.check1').live('click', function () {
        if ($(this).attr("checked")) {
            $('input:checkbox[name=checkchilden]').attr("checked", ":checked")
        } else {
            $('input:checkbox[name=checkchilden]').removeAttr('checked');
        }
    })

    //由于和input:checkbox冲突，在选择一次
    $("#table1 tr td input:checkbox:not(.check1)").live('click', function () {
        if ($(this).is(':checked')) {
            $(this).removeAttr("checked");
        } else {
            $(this).attr("checked", ":checked")
        }
    })
    //单击选中
    $("#table1 tr td").live('click', function () {
        if ($(this).parent().find("input:checkbox[name=checkchilden]").is(':checked')) {
            $(this).parent().find("input:checkbox[name=checkchilden]").removeAttr("checked");
        } else {
            $(this).parent().find("input:checkbox[name=checkchilden]").attr("checked", ":checked")
        }
    })

    //返回
    function back() {
        parent.closeSelectCard()

        //location = '<%=path%>/DrivingSys/querySubjectOneReg/look.action';
    }

    //改变审核状态
    function audit(num) {
        var fid = $("input:hidden[name=fid]").val();
        var fnumber = $("input:text[name=fnumber]").val();
        if (fid == null || fnumber == null) {
            return false;
        }
        if (num == 3) {//反审核
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data10').css('visibility', 'visible')
            var activitiState = $('.activitiState').val();
            $("#againstAuditsubmit").click(function () {
                var againstAuditcomment = $("#againstAuditcomment").val();
                if (againstAuditcomment == null || againstAuditcomment == '') {
                    againstAuditcomment = "不同意";
                }
                $.ajax({
                    url: '<%=path%>/DrivingSys/againstCheckSubjectOneRegActiviti',
                    type: 'post',
                    data: {
                        'fid': fid,
                        'fnumber': fnumber,
                        'againstAuditcomment': againstAuditcomment,
                        'activitiState': activitiState
                    },
                    dataType: 'json',
                    success: function (result) {
                        if (result["result"] == 'success') {
                            //showAlert("反审核成功!", "querySubjectOneReg/look.action")
                            showAlert("反审核成功!", "intoUpdateSubjectOneReg?fid="+fid)

                            /*alert("反审核成功!")
                            setTimeout(function () {
                                location="
                            <%=path%>/DrivingSys/querySubjectOneReg/look.action";
                            }, 1000);*/

                        } else {
                            alert("反审核失败!")
                        }
                    },
                    error: function () {
                        alert('Error')
                    }
                })
            })

        }
        if (num == 4) {//提交
            $.messager.confirm('提示', '是否提交?', function (r) {
                if (r) {//确定
                    $.ajax({
                        url: '<%=path%>/DrivingSys/submitSubjectOneRegActiviti',
                        type: 'post',
                        data: {'fid': fid, 'fnumber': fnumber},
                        dataType: 'json',
                        success: function (result) {
                            if (result["result"] == 'success') {
                                //showAlert("提交成功!", "querySubjectOneReg/look.action")
                                showAlert("提交成功!", "intoUpdateSubjectOneReg?fid="+fid)
                                /* alert("提交成功!")
                                 setTimeout(function () {
                                     location="
                                <%=path%>/DrivingSys/querySubjectOneReg/look.action";
                               }, 1000);*/
                            } else {
                                alert("提交失败!")
                            }
                        },
                        error: function () {
                            alert('Error')
                        }
                    })
                }
            })
        }

        if (num == 5) {   //审核
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data9').css('visibility', 'visible')
            $("#auditsubmit").click(function () {
                var agree = $("input:radio[name=check]:checked").val();//同意不同意
                var auditcomment = $("#auditcomment").val();
                if (agree == null) {
                    alert("你选择你的意见");
                    return false;
                }
                if (auditcomment == null || auditcomment == '') {
                    if (agree == "1") {
                        auditcomment = "同意";
                    } else {
                        auditcomment = "不同意";
                    }
                }

                $.ajax({
                    url: '<%=path%>/DrivingSys/checkSubjectOneRegActiviti',
                    type: 'post',
                    data: {'fid': fid, 'fnumber': fnumber, 'agree': agree, 'auditcomment': auditcomment},
                    dataType: 'json',
                    // async: true,
                    success: function (result) {
                        if (result["result"] == 'success') {
                            //showAlert("审核成功!", "querySubjectOneReg/look.action")
                            showAlert("审核成功!", "intoUpdateSubjectOneReg?fid="+fid)
                            /*alert("审核成功!")
                            setTimeout(function () {
                                location="
                            <%=path%>/DrivingSys/querySubjectOneReg/look.action";
                            }, 1000);*/
                        } else if (result["result"] == 'isNoResponsiblePerson') {
                            alert("当前用户不是要求的经办人!")
                        } else if (result["result"] == 'successAndOver') {
                            //showAlert("此流程成功推进，并且此流程已经结束!", "querySubjectOneReg/look.action")
                            showAlert("此流程成功推进，并且此流程已经结束!", "intoUpdateSubjectOneReg?fid="+fid)
                            /*alert("此流程成功推进，并且此流程已经结束!")
                            setTimeout(function () {
                                location="
                            <%=path%>/DrivingSys/querySubjectOneReg/look.action";
                            }, 1000);*/
                        } else {
                            alert("审核失败")
                        }
                    },
                    error: function () {
                        alert('Error')
                    }
                })
            })

        }
    }

    function subForm() {
        var count = 0;
        $("input:checkbox[name=checkchilden]").each(function (i) {
            count++;
        })
        if (count == 0) {
            alert("请先添加学员!")
            return false;
        }
        $("input[type='submit']").attr("disabled", "disabled");
    }

    //改变业务日期或者车型清空已经增加的学员
    var oldTime = oldTime = $("#ywrq").val();//记录改变之前的时间
    function changeFbizdate(obj) {
        var k = 0;
        $("input:checkbox[name=checkchilden]").each(function (i) {
            k++;
        })
        if (k != 0) {
            $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
                if (r) {
                    $("input:checkbox[name=checkchilden]").each(function (i) {
                        $(this).parent().parent().remove()
                    })
                    num = num - k;
                    $("#cfdqbkrs").val(num)
                    $("#cfzbs").val(num)
                    oldTime = $("#ywrq").val()
                } else {
                    $("#ywrq").val(oldTime)
                }
            })
        } else {//把oldTime赋值
            oldTime = $("#ywrq").val()
        }
    }

    var oldCartype = $(".cfcartype").val();//记录之前的车型
    function changeCartype() {
        var k = 0;
        $("input:checkbox[name=checkchilden]").each(function (i) {
            k++;
        })
        if (k != 0) {
            $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
                if (r) {
                    $("input:checkbox[name=checkchilden]").each(function (i) {
                        $(this).parent().parent().remove()
                    })
                    num = num - k;
                    $("#cfdqbkrs").val(num)
                    $("#cfzbs").val(num)
                    oldCartype = $(".cfcartype").val()
                } else {
                    $(".cfcartype").val(oldCartype)
                }
            })
        } else {//把oldTime赋值
            oldCartype = $(".cfcartype").val()
        }
    }
</script>
</html>